import axios from './http'
import base from './base'
import qs from 'qs'
const borrow = {
  getInfo (params) {
    return axios.get(`${base.pro}/api/load/loadinfo`, { params })
  },
  // 借款
  money (params) {
    return axios.post(`${base.pro}/api/load/borrow`, qs.stringify(params))
  },
  // 获取身份证信息
  getId (params) {
    return axios.get(`${base.pro}/api/authentication/identity`, { params })
  },
  // 身份认证
  authentication (params) {
    return axios.post(`${base.pro}/api/authentication/identity`, qs.stringify(params))
  },
  // 获取联系人
  getContacts (params) {
    return axios.get(`${base.pro}/api/authentication/contacts`, { params })
  },
  // 认证联系人
  authenticationConcats (params) {
    return axios.post(`${base.pro}/api/authentication/contacts`, qs.stringify(params))
  },
  // 获取银行卡
  getCard (params) {
    return axios.get(`${base.pro}/api/authentication/bank`, { params })
  },
  // 银行卡认证
  authenticationCard (params) {
    return axios.post(`${base.pro}/api/authentication/bank`, qs.stringify(params))
  },
  // 借款页面信息
  getPageInfo (params) {
    return axios.get(`${base.pro}/api/load/detail`, { params })
  },
  // 认证状态
  getState (params) {
    return axios.get(`${base.pro}/api/authentication/state`, { params })
  },
  upLoad (params) {
    return axios.post(`${base.pro}/api/common/upload`, qs.stringify(params))
  }
}

export default borrow
